home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / gle33b_1.zip / GLE4.ZIP / CLIP.GLE < prev    next >
Text File  |  1992-03-25  |  1KB  |  44 lines

  1. size 18 24        ! This is CLIP.GLE, sets up arbitrary clipping region.
  2. ! Clipping doesn't work on the screen
  3. ! to see this example enter :
  4. ! dvigle clip
  5. ! dviprint -dvt
  6. set hei .3 font texcmr    ! you can remove the font setting for PostScript
  7.             ! printers.
  8. amove 2.3 .3
  9. text clip.gle
  10.  
  11. set hei 10
  12. amove 2 2 
  13. begin clip    ! Save default clipping region
  14. begin path clip    ! Set up the clipping region
  15.     text GLE
  16. end path
  17. gsave
  18.     amove 2 2     
  19.     text www    ! Draw some text which will be clipped
  20.     for i =    1 to 90    ! Draw some lines which will be clipped
  21.         amove 2    2 
  22.         rotate -1
  23.         rline 0 30
  24.     next i
  25. grestore
  26. end clip ! restore default clippping region
  27. amove 0 0 
  28. rline 10 10     ! draw a line which won't be clipped.
  29. !-----------------------------------------------------------------------------
  30. !Here's a simple example of how to set up a clipping region which consists
  31. !of two squares. Try this out
  32. amove 1 11
  33. begin origin
  34. begin path clip stroke
  35.     amove 2 2 
  36.     box 4 4 
  37.     amove 7 2 
  38.     box 4 4 
  39. end path
  40. amove 2 2 
  41. set hei 4
  42. text Here is clipped text
  43. end origin
  44.